home *** CD-ROM | disk | FTP | other *** search
- Path: news.corp.hp.com!news
- From: Earl Chew <earl@hpato.aus.hp.com>
- Newsgroups: comp.lang.c++,comp.lang.c
- Subject: Re: Performance: C vs. C++
- Date: Wed, 07 Feb 1996 11:59:44 +1100
- Organization: Hewlett-Packard Co.
- Message-ID: <3117F980.7890@hpato.aus.hp.com>
- References: <30F6BAAC.12B5@iastate.edu> <4da9pn$a45@news.bridge.net> <4dnpl2$c8g@classic.iinet.com.au> <3105E9DC.1BE3@enermet.fi> <DLr46y.7rH@txnews.amd.com> <4elk5l$3f2q@yuma.ACNS.ColoState.EDU> <pronet01.31.003EB1E6@indirect.com>
- NNTP-Posting-Host: hpautorb.aus.hp.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b6a (X11; I; HP-UX A.09.05 9000/715)
-
- Mark Miller wrote:
- > 2 people told me in the past that C++ sucked because it was too slow and
- > when I looked at their programs, I noticed that they did not pass by reference
- > to methods (which always invokes constructors and destructors in addition
- > to stack operations), and that they ended up calling member functions inside of
- > for-loops;
-
- Agreed. C++ makes a lot of things easy to do including:
-
- 1. Passing large objects by value.
- 2. Creating temporary objects as a result of silent conversions.
- 3. Creating new code as a result of template instantiation.
-
- It's very easy to build large programs that require lots of memory and
- that run very slowly.
-
- Earl
- --
- +----------------------------------------------------------------------+
- | Earl Chew Email: earl_chew@aus.hp.com |
- | Hewlett-Packard Australia Ltd Tel: +61 3 9210 5528 |
- | Australian Telecom Operation Fax: +61 3 9210 5550 |
- | 347 Burwood Highway GPS: 37 48'44"S 145 8'51"E |
- | Burwood East, Victoria 3151, Australia |
- +----------------------------------------------------------------------+
-